import { persistReducer,persistStore } from "redux-persist";
import storage from 'redux-persist/lib/storage'
import logger from "redux-logger";// 导入日志
import thunk from "redux-thunk";
import {configureStore} from  '@reduxjs/toolkit' 
import counterReducer from './counterSlice'// 导入处理器
const persistConfig = {key:"root",storage,blacklist:[]}

export const store = configureStore({
  reducer:{
    counter:persistReducer(persistConfig,counterReducer)
  },
  middleware:[logger,thunk]
})
 
persistStore(store)